package com.testspring.util;

public class Counter {
	private int count = 0;

	private static Counter counter;
	
	private Counter(){
		
	}
	
	public static Counter getIntance(){
		if (counter == null) {
			return new Counter();
		}
		return counter;
	}
	
	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count += count;
	}
	
	public String toString() {
		return String.valueOf(getCount());
	}
	
	public static void main(String[] args) {
		Counter counter = new Counter();
		counter.setCount(1);
		counter.setCount(1);
		System.out.println(counter.toString());
	}
}

class CountThread implements Runnable{

	public void run() {
		
	}
	
}
